#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        int n;
        cin >> n;
        int cnt = 0;
        for (int i = 1; i <= n; i++)
        {
            if (sqrt(i) == (int)sqrt(i))
                cnt++;
        }
        cout << cnt << endl;
    }
    return 0;
}